<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<title>BreadboardGenerator</title>
	<style type="text/css" media="all">
		@import "resources/guide_style.css";
	</style>
</head>
<body>
<h1 id="breadboardgenerator">Fritzing Breadboard generator</h1>
version 1.2
<p>
<img src="resources/breadboard_photo.jpg" alt="a breadboard" title="A typical breadboard">
<br /><em>An example of a breadboard.</em>
</p>
<h2 id="usage">Usage</h2>

<p>This script can outputs the image (.svg) or the fritzing part file (.fzp) for a breadboard. To run it you use the command line. Go to the folder that contains the scipt and run it with the <code>run</code> and <code>svg</code>. Like this:</p>
<pre class="commandline">
    % cd FrizingPDK/Tools/BreadboardGenerator
    % python generator.py run svg
</pre>
<p>it will just spit out a bunch of svg xml into your window. You can copy and paste it from there, but it&#8217;s <strong>more convenient</strong> to send the output of the command to a file directly. In Unix terms this is called <em>redirecting</em>:</p>
<pre class="commandline">
    % python generator.py run svg &gt; myBreadboard.svg
</pre>
<p>This will generate an image file <code>myBreadboard.svg</code> in the same location as where you are running the script from.</p>

<p>This is still not very useful to run the script like this, because it is just generating the svg and fzp code for the <em>standard</em> breadboard, which already is in your Fritzing library. That's why this tool becomes especially useful if you want to create your own <em>no-so-standard</em> breadboard.</p>

<p><strong>The way to use this tool is to modify it.</strong> Open the <code>generator.py</code> in your favorite code editor and change the variables. Most useful variables to play with can be found in the <code>setup()</code> method, right below</p>
<pre class="textmate-source"><span class='linenum'>   50</span> <span class="meta meta_function meta_function_python"><span class="storage storage_type storage_type_function storage_type_function_python">def</span> <span class="entity entity_name entity_name_function entity_name_function_python">setup</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_python">(</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_end punctuation_definition_parameters_end_python">)</span><span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_begin punctuation_section_function_begin_python">:</span></span>
<span class='linenum'>   51</span>     <span class="comment comment_line comment_line_number-sign comment_line_number-sign_python"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_python">#</span> Edit these variables below to generate different breadboards
</span><span class='linenum'>   52</span>     <span class="comment comment_line comment_line_number-sign comment_line_number-sign_python"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_python">#</span></pre>

<p>There you'll find some properties, which you'll want to change to make this your own unique part: the <code>title</code>, <code>moduleID</code> and maybe the <code>label</code> and its <code>taxonomy</code>. The <code>svgFile</code> should be the file name of the svg file that you'll save it to.</p>

<pre class="textmate-source"><span class='linenum'>   54</span>     <span class="meta meta_item-access meta_item-access_python">sL<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>title<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="string string_quoted string_quoted_double string_quoted_double_single-line string_quoted_double_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">"</span>My Breadboard<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">"</span></span>
<span class='linenum'>   55</span>     <span class="meta meta_item-access meta_item-access_python">sL<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>moduleID<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="string string_quoted string_quoted_double string_quoted_double_single-line string_quoted_double_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">"</span>MyBreadboardModuleID<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">"</span></span>
<span class='linenum'>   56</span>     <span class="meta meta_item-access meta_item-access_python">sL<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>svgFile<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="string string_quoted string_quoted_double string_quoted_double_single-line string_quoted_double_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">"</span>myBreadboard.svg<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">"</span></span>
<span class='linenum'>   57</span> 
<span class='linenum'>   58</span>     <span class="meta meta_item-access meta_item-access_python">sL<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>label<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="string string_quoted string_quoted_double string_quoted_double_single-line string_quoted_double_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">"</span>Breadboard<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">"</span></span>
<span class='linenum'>   59</span>     <span class="meta meta_item-access meta_item-access_python">sL<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>taxonomy<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="string string_quoted string_quoted_double string_quoted_double_single-line string_quoted_double_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">"</span>prototyping.breadboard.breadboard.breadboard0<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">"</span></span></pre>

<p>And then there you'll find some other variables (and properties of the <code>rowProps</code> and <code>lineProps</code> dict) which specify exactly how your breadboard looks:</p>

<pre class="textmate-source"><span class='linenum'>   65</span>     <span class="comment comment_line comment_line_number-sign comment_line_number-sign_python"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_python">#</span> Rows 
</span><span class='linenum'>   66</span>     rowHeight <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">5</span> <span class="comment comment_line comment_line_number-sign comment_line_number-sign_python"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_python">#</span> You probably never need to change this, but who knows
</span><span class='linenum'>   67</span>     rowsInterBlockSpacing <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">2</span>
<span class='linenum'>   68</span>     <span class="meta meta_item-access meta_item-access_python">rowProps<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>startsAtX<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_python">-</span><span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">1</span>
<span class='linenum'>   69</span>     <span class="meta meta_item-access meta_item-access_python">rowProps<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>startsAtYWithLetter<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>A<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span>
<span class='linenum'>   70</span>     <span class="meta meta_item-access meta_item-access_python">rowProps<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>segmentLength<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">64</span>
<span class='linenum'>   71</span>     <span class="meta meta_item-access meta_item-access_python">rowProps<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>interSegmentSpacing<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">2</span>
<span class='linenum'>   72</span>     <span class="meta meta_item-access meta_item-access_python">rowProps<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>numberOfSegments<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">1</span>    
<span class='linenum'>   73</span>         
<span class='linenum'>   74</span>     <span class="comment comment_line comment_line_number-sign comment_line_number-sign_python"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_python">#</span> Lines
</span><span class='linenum'>   75</span>     numberOfLinesPerSet <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">2</span>
<span class='linenum'>   76</span>     interRowsLinesSpacing <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">2</span>
<span class='linenum'>   77</span>     <span class="meta meta_item-access meta_item-access_python">lineProps<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>startAtX<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">2</span>
<span class='linenum'>   78</span>     <span class="meta meta_item-access meta_item-access_python">lineProps<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>subSegmentLength<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">5</span>
<span class='linenum'>   79</span>     <span class="meta meta_item-access meta_item-access_python">lineProps<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>interSubSegmentSpacing<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">1</span>
<span class='linenum'>   80</span>     <span class="meta meta_item-access meta_item-access_python">lineProps<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>segmentLength<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">5</span> <span class="comment comment_line comment_line_number-sign comment_line_number-sign_python"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_python">#</span> measures in subSegments
</span><span class='linenum'>   81</span>     <span class="meta meta_item-access meta_item-access_python">lineProps<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>interSegmentSpacing<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">2</span>
<span class='linenum'>   82</span>     <span class="meta meta_item-access meta_item-access_python">lineProps<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>numberOfSegments<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="constant constant_numeric constant_numeric_integer constant_numeric_integer_decimal constant_numeric_integer_decimal_python">2</span>
<span class='linenum'>   83</span>     <span class="meta meta_item-access meta_item-access_python">lineProps<span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python">[</span><span class="meta meta_item-access meta_item-access_arguments meta_item-access_arguments_python"><span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>endsAtYWithLetter<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></span><span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python">]</span></span> <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_python">=</span> <span class="string string_quoted string_quoted_single string_quoted_single_single-line string_quoted_single_single-line_python"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python">'</span>Z<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python">'</span></span></pre>

<p>Those variables and properties define how the breadboard is generated and what kind of breadboard it is. The following diagram shows where those variables and properties apply on the breadboard and how to measure them.</p>

<img src="resources/breadboard_diagram.png" alt="diagram of variables used" title="The diagram of breadboard variables">
<p><em>a diagram of all the variables and properties used in the generation of a breadboard.</em></p>

<h3 id="choose_your_weapon">Choose your weapon</h3>

<p>This tool can create the image (a <code>.svg</code> file) and the Fritzing part (a <code>.fzp</code> file). To choose between these two you have to use a second argument after <code>run</code>: <code>svg</code> or <code>fzp</code>.</p>

<p>The following commands creates both the image and the part file:</p>
<pre class="commandline">
	% python generator.py run svg &gt; myBreadboard.svg
	% python generator.py run fzp &gt; myBreadboard.fzp
</pre>

<h3 id="modify_the_image">Modify the image</h3>

<p>This tool creates <em>almost</em> a perfect breadboard image. It creates all the right sockets and creates the right size background. It just doesn&#8217;t fix the <strong>text</strong> on the breadboard and the <strong>grooves and notches</strong>. For those elements this script just uses the artwork from the standard breadboard. So you would have to open the file in your drawing application and fix those elements yourself.</p>

<p><strong>NOTE</strong>: The image created through this script is <em>90dpi</em>. But Adobe Illustrator can only understand and assumes 72dpi. So if you open the svg in Adobe Illustrator it will scale it down (from 90 to 72 dpi), and if you then save, it will be <strong>too small</strong>.<br>
The trick to solve this nasty dpi scaling problem is that you first <strong>1.</strong> remove the size data from the svg file with a texteditor. Then <strong>2.</strong> you open and modify the file in Illustrator. Finally <strong>3.</strong> you go back to the texteditor and edit the scaling back in. Check the resolution manifest for details.</p>

<hr />
<h2 id="full_reference">Full Reference</h2>

<p>This script outputs the image (.svg) or the fritzing part file (.fzp) for a breadboard.</p>
<h3>Usage:</h3>

<p>Run it in the commandline and <em>redirect</em> the result to a file:</p>
<pre class="commandline">
	python generator.py run [svg|fzp] &gt; partdescription.xml
</pre>

<h3>Arguments:</h3>
<dl>
<dt><strong>run</strong></dt>
<dd>Use this to run the script. Without this argument, this same help text is displayed.</dd>
<dt><strong>[svg|fzp]</strong></dt>
<dd>Specify whether the script should generate the .svg file or the .fzp file.<br>
If this argument is omitted, it defaults to svg.</dd></dl>
<h3>Advanced Usage:</h3>
<p>If you want to change the type of breadboard which this script generates (the main reason for this script to be in the Fritzing PDK), you can easily edit the python file. The setup() method defines most of the parameters of the breadboard. Probably changing values here is enough for you to make the exact breadboard you like.</p>
<hr />
<p>
For more information on how to create parts and how to use them in Fritzing,<br />
please read the online documentation:<br />
<a href="http://fritzing.org/learning/parts">http://fritzing.org/learning/parts</a>
</p>
</body>
</html>
